package org.jeecg.modules.oms.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 客户统计数据VO
 * @Author: jeecg-boot
 * @Date: 2025-09-14
 * @Version: V1.0
 */
@Data
@ApiModel(value = "CustomerStatisticsVO", description = "客户统计数据VO")
public class CustomerStatisticsVO {

    /**
     * 客户概览统计数据
     */
    @Data
    @ApiModel(value = "CustomerOverviewVO", description = "客户概览统计数据")
    public static class CustomerOverviewVO {
        @ApiModelProperty(value = "总客户数")
        private Integer totalCustomers;

        @ApiModelProperty(value = "活跃客户数")
        private Integer activeCustomers;

        @ApiModelProperty(value = "新增客户数")
        private Integer newCustomers;

        @ApiModelProperty(value = "平均客单价")
        private BigDecimal avgOrderAmount;

        @ApiModelProperty(value = "客户增长率")
        private BigDecimal customerGrowthRate;

        @ApiModelProperty(value = "活跃客户增长率")
        private BigDecimal activeGrowthRate;

        @ApiModelProperty(value = "新增客户增长率")
        private BigDecimal newGrowthRate;

        @ApiModelProperty(value = "客单价增长率")
        private BigDecimal avgAmountGrowthRate;
    }

    /**
     * 客户排行榜项目
     */
    @Data
    @ApiModel(value = "CustomerRankingItem", description = "客户排行榜项目")
    public static class CustomerRankingItem {
        @ApiModelProperty(value = "排名")
        private Integer rank;

        @ApiModelProperty(value = "客户ID")
        private String customerId;

        @ApiModelProperty(value = "客户名称")
        private String customerName;

        @ApiModelProperty(value = "销售金额")
        private BigDecimal salesAmount;

        @ApiModelProperty(value = "订单数量")
        private Integer orderCount;

        @ApiModelProperty(value = "增长率")
        private BigDecimal growthRate;

        @ApiModelProperty(value = "占比")
        private BigDecimal percentage;
    }

    /**
     * 客户贡献度分析数据
     */
    @Data
    @ApiModel(value = "CustomerContributionVO", description = "客户贡献度分析数据")
    public static class CustomerContributionVO {
        @ApiModelProperty(value = "TOP10客户销售额")
        private BigDecimal top10Amount;

        @ApiModelProperty(value = "其他客户销售额")
        private BigDecimal othersAmount;

        @ApiModelProperty(value = "TOP10客户订单数")
        private Integer top10Orders;

        @ApiModelProperty(value = "其他客户订单数")
        private Integer othersOrders;

        @ApiModelProperty(value = "TOP10客户占比")
        private BigDecimal top10Percentage;

        @ApiModelProperty(value = "其他客户占比")
        private BigDecimal othersPercentage;
    }

    /**
     * 新老客户分析数据
     */
    @Data
    @ApiModel(value = "CustomerAnalysisVO", description = "新老客户分析数据")
    public static class CustomerAnalysisVO {
        @ApiModelProperty(value = "新客户数量")
        private Integer newCustomerCount;

        @ApiModelProperty(value = "老客户数量")
        private Integer oldCustomerCount;

        @ApiModelProperty(value = "新客户销售额")
        private BigDecimal newCustomerAmount;

        @ApiModelProperty(value = "老客户销售额")
        private BigDecimal oldCustomerAmount;

        @ApiModelProperty(value = "新客户占比")
        private BigDecimal newCustomerPercentage;

        @ApiModelProperty(value = "老客户占比")
        private BigDecimal oldCustomerPercentage;
    }
}
